#include <stm32f10x.h> // Device header
#include "led.hpp"
#include "exti.hpp"
#include "beep.hpp"
#include "exti_handler.h"
#include "TIMER.hpp"
#include "digi_tube.hpp"
#include "my_pwm_output.hpp"
#include "time_manager_for_while.hpp"
int main()
{
    //使能时钟
    RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1 | RCC_APB2Periph_TIM1 | RCC_APB2Periph_AFIO | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOC, ENABLE);
    // jtag??
    time_management::time_management_init();
    led_init_commond();
    //    Timer_setup::Timer_init(72000000000 / 10000000, 0, TIM2_BASE, TIM2_IRQn, 0x04, 0x04);
    // SysTick_CLKSourceConfig()
    my_TIM1_pwm_output::TIM1_PWM_init();
    my_TIM1_pwm_output::TIM1_GPIO_INIT();
    my_TIM1_pwm_output::TIM1_ADC_trigger_init();
    my_TIM1_pwm_output::TIM1_CCR_change(1, 1, 1);

    while (1)
    {
        time_management::time_management_run();
    }
}
